/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

$(document).ready(function(){
    var count_items = 1;
    $('#delete_item').click(function(){
        if(count_items > 1)
        {
            $(this).parent().parent().parent().remove();
            count_items--;
        }
    });
    
    $('#add_item').click(function(){
        item_copy = $('#items').clone(true);
        item_copy.find("input:text").val("");
        item_copy.appendTo('#list_of_items');
        count_items++;
    });
})
